home *** CD-ROM | disk | FTP | other *** search
/ Champak 33 / Volume 33 - JOGO DISK .iso / Games / protect_the_fire.swf / scripts / DefineSprite_274 / frame_30 / DoAction.as
Text File  |  2007-01-15  |  225b  |  16 lines

  1. trace("AI: set angle");
  2. slope = deltay / deltax;
  3. if(slope < "0")
  4. {
  5.    slope *= "-1";
  6. }
  7. i = "1";
  8. while(i < "91" and angle == "0")
  9. {
  10.    if(slope < eval("/:angle" add i))
  11.    {
  12.       angle = i;
  13.    }
  14.    i += "3";
  15. }
  16.